/*
 * Create Time :  Feb 26, 2009
 * File Name   :  SerialExample.java
 * Author      :  kxie
 * (c) Copyright Carrier Access. All rights reserved.
 */

package com.xksoft.simple;

import java.io.*;
/**
 *
 * This is an example of how to use the SerialBean. It opens COM1 and reads
 * six messages with different length form the serial port.
 *
 */
class SerialExample
{
  public static void main(String[] args)
  { 
    //TO DO: Add your JAVA codes here
    SerialBean SB = new SerialBean(1);
    String Msg;
    SB.Initialize();
//    for (int i = 5; i <= 10; i++)
//    {
//      Msg = SB.ReadPort(i);
//      SB.WritePort("Reply: " + Msg);
//    }
//    SB.ClosePort();
    String msg = "hello world";
    SB.Initialize();
    SB.WritePort(msg);
    SB.ClosePort();
  }
}